/* 基础样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

:root {
    --primary-color: #3f51b5;
    --secondary-color: #2ecc71;
    --text-color: #333;
    --light-gray: #f5f5f5;
    --medium-gray: #e0e0e0;
    --dark-gray: #666;
    --border-color: #ddd;
    --shadow-color: rgba(0, 0, 0, 0.1);
    --active-tab-color: #3f51b5;
    --font-family: 'PingFang SC', 'Microsoft YaHei', sans-serif;
    
    /* iPhone 15适配变量 */
    --iphone15-width: 390px;
    --iphone15-height: 844px;
    --iphone-safe-area-top: 47px;
    --iphone-safe-area-bottom: 34px;
    --content-max-width: 450px;
    --card-radius: 10px;
}

html, body {
    font-family: var(--font-family);
    font-size: 14px;
    color: var(--text-color);
    background-color: #f9f9f9;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    min-height: 100vh;
    overflow-x: hidden;
}

.app-container {
    max-width: var(--content-max-width);
    margin: 0 auto;
    position: relative;
    min-height: 100vh;
    background-color: #fff;
    overflow-x: hidden;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.05);
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

button, input, select, textarea {
    font-family: inherit;
    font-size: inherit;
    color: inherit;
    outline: none;
}

button {
    cursor: pointer;
    background: none;
    border: none;
}

ul, ol {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
}

/* 常用工具类 */
.flex {
    display: flex;
}

.flex-center {
    display: flex;
    align-items: center;
    justify-content: center;
}

.flex-between {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.flex-column {
    display: flex;
    flex-direction: column;
}

.hidden {
    display: none !important;
}

/* 动画效果 */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.fade-in {
    animation: fadeIn 0.3s ease-in-out;
}

@keyframes slideUp {
    from { transform: translateY(20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.slide-up {
    animation: slideUp 0.3s ease-in-out;
}

/* 深色模式适配 */
@media (prefers-color-scheme: dark) {
    :root {
        --text-color: #f5f5f5;
        --light-gray: #333;
        --medium-gray: #444;
        --dark-gray: #aaa;
        --border-color: #555;
        --shadow-color: rgba(0, 0, 0, 0.3);
    }

    body {
        background-color: #121212;
    }
    
    .app-container {
        background-color: #1e1e1e;
    }
}

/* iPhone 15 适配 */
@media screen and (width: 390px) and (height: 844px) {
    .app-container {
        max-width: 100%;
        min-height: var(--iphone15-height);
    }
} 